package com.application.magazine.util;



import java.io.StringWriter;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Collection;
import java.util.List;
import java.util.Map;

import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;

import org.w3c.dom.Element;
import org.w3c.dom.Node;

import com.devsmart.android.StringUtils;

public class CommonUtil {

	public static boolean isNotBlankValue(Object object) {
		return !isBlankValue(object);
	}

	public static boolean isBlankValue(Object object) {

		boolean isBlankValue = true;

		if (object != null) {
			if (object instanceof String) {
				String stringObject = (String) object;
				if (stringObject != null && !stringObject.equals("") &&stringObject.trim().length() > 0) {

					isBlankValue = false;
				}

			} else {
				isBlankValue = false;
			}
		}

		return isBlankValue;
	}
	public static boolean isNumeric(String str)
	{
	  return str.matches("-?\\d+(\\.\\d+)?");  //match a number with optional '-' and decimal.
	}

    
}
